package com.example.mybatis.fluent.db.entity;

import cn.org.atool.fluent.mybatis.annotation.FluentMybatis;
import cn.org.atool.fluent.mybatis.annotation.GmtCreate;
import cn.org.atool.fluent.mybatis.annotation.TableField;
import cn.org.atool.fluent.mybatis.base.RichEntity;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * SysUserRoleEntity: 数据映射实体定义
 *
 * @author Powered By Fluent Mybatis
 */
@SuppressWarnings({"rawtypes", "unchecked"})
@Data
@Accessors(
    chain = true
)
@EqualsAndHashCode(
    callSuper = false
)
@AllArgsConstructor
@NoArgsConstructor
@FluentMybatis(
    table = "sys_user_role",
    schema = "zhqj"
)
public class SysUserRoleEntity extends RichEntity {
  private static final long serialVersionUID = 1L;

  @TableField(
      value = "role_id",
      desc = "角色ID"
  )
  private Long roleId;

  @TableField(
      value = "user_id",
      desc = "用户ID"
  )
  private Long userId;

  @TableField(
      value = "create_time",
      insert = "now()",
      desc = "创建时间"
  )
  @GmtCreate
  private Date createTime;

  @Override
  public final Class entityClass() {
    return SysUserRoleEntity.class;
  }
}
